﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace PubSubWeb.Model
{
    public class Subscription
    {
        public string CallbackURL;

        public string TopicURL;

        public SubscriptionVerificationType VerificationType;

        public VerificationState VerificationState;

        public DateTime ExpiryTime;

        public string Secret;

        public string VerifyToken;

        public Subscription(
                string callback,
                string topic,
                SubscriptionVerificationType verificationType,
                int leaseSeconds,
                string secret,
                string verifyToken)
        {
            this.CallbackURL = callback;
            this.TopicURL = topic;
            this.VerificationType = verificationType;
            this.VerificationState = VerificationState.NotVerified;
            this.ExpiryTime = DateTime.Now.AddSeconds(leaseSeconds);
            this.Secret = secret;
            this.VerifyToken = verifyToken;
        }
    }
}
